<?php

function i18n_setup()
{
	global $locale;
	session_start();

	$locale_session;

	if(!empty($_REQUEST['locale']))
	{
		$locale_session = $_REQUEST['locale'];
	}
	else if ( !empty($_SESSION['locale']))
	{
		$locale_session = $_SESSION['locale'];
	}
	else
	{
		$locale_session = 'zh_CN';
	}

	$_SESSION['locale'] = $locale_session;
	$locale = $_SESSION['locale'];
}

?>